<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增工资条')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-gzt-add">
        	<div class="form-group">    
                <label class="col-sm-1 control-label is-required">日期：</label>
                <div class="col-sm-2">
                    <div class="input-group date">
                        <input name="years" class="form-control" th:value="${years}" required placeholder="yyyy-MM" type="text" autoComplete="off" >
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-1 control-label is-required">姓名：</label>
                <div class="col-sm-2">
                    <input name="name" class="form-control" type="text" autoComplete="off" required>
                </div>
                <label class="col-sm-1 control-label is-required">基本工资：</label>
                <div class="col-sm-2">
                    <input name="jbgz" class="form-control" type="text" autoComplete="off" required>
                </div>
                <label class="col-sm-1 control-label is-required">岗位津贴：</label>
                <div class="col-sm-2">
                    <input name="gwjt" class="form-control" type="text" autoComplete="off" required>
                </div>
                <label class="col-sm-1 control-label is-required">午餐补助：</label>
                <div class="col-sm-2">
                    <input name="wcbt" class="form-control" type="text" autoComplete="off" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-1 control-label is-required">通讯补助：</label>
                <div class="col-sm-2">
                    <input name="txbt" class="form-control" type="text" autoComplete="off" required>
                </div>
                <label class="col-sm-1 control-label is-required">交通补助：</label>
                <div class="col-sm-2">
                    <input name="jtbt" class="form-control" type="text" autoComplete="off" required>
                </div>
                <label class="col-sm-1 control-label is-required">应发工资：</label>
                <div class="col-sm-2">
                    <input name="yfgz" class="form-control" type="text" autoComplete="off" required>
                </div>
                <label class="col-sm-1 control-label is-required">其它：</label>
                <div class="col-sm-2">
                    <input name="qt" class="form-control" type="text" autoComplete="off" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-1 control-label is-required">社保个人承担：</label>
                <div class="col-sm-2">
                    <input name="sbgrcd" class="form-control" type="text" autoComplete="off" required>
                </div>
                <label class="col-sm-1 control-label is-required">社保公司承担：</label>
                <div class="col-sm-2">
                    <input name="sbgscd" class="form-control" type="text" autoComplete="off" required>
                </div>
                <label class="col-sm-1 control-label is-required">公积金个人承担：</label>
                <div class="col-sm-2">
                    <input name="gjjgrcd" class="form-control" type="text" autoComplete="off" required>
                </div>
                <label class="col-sm-1 control-label is-required">公积金公司承担：</label>
                <div class="col-sm-2">
                    <input name="gjjgscd" class="form-control" type="text" autoComplete="off" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-1 control-label is-required">个人所得稅：</label>
                <div class="col-sm-2">
                    <input name="grsds" class="form-control" type="text" autoComplete="off" required>
                </div>
                <label class="col-sm-1 control-label is-required">合计：</label>
                <div class="col-sm-2">
                    <input name="hj" class="form-control" type="text" autoComplete="off" required>
                </div>
                <label class="col-sm-1 control-label is-required">实发工资：</label>
                <div class="col-sm-2">
                    <input name="sfgz" class="form-control" type="text" autoComplete="off" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-1 control-label">备注：</label>
                <div class="col-sm-11">
                    <textarea name="memo" class="form-control"></textarea>
                </div>
            </div>
        </form>
    </div>
    <div class="row">
        <div class="col-sm-offset-5 col-sm-10">
            <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
            <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "gcgl/gzt"
        $("#form-gzt-add").validate({
            focusCleanup: true
        });
        
        $("input[name='years']").datetimepicker({
            format: "yyyy-mm",
            minView: "month",
            autoclose: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.saveTab(prefix + "/add", $('#form-gzt-add').serialize());
            }
        }

    </script>
</body>
</html>